<div class="juosta">
<?php $tree = Tree::getByLabel('NEWS'); ?>
    <?php if( $tree ): ?>
        <?php echo link_to(get_domain_name()
                        , '@homepage'); ?>&nbsp;/&nbsp;
        <?php echo link_to($tree->getName(true)
                        , 'tree/page?id=' . $tree->getId()); ?>&nbsp;/&nbsp;
        <?php echo $newsItem->getName();?>
    <?php else: ?>
        <?php echo ucfirst(__('news'));?>&nbsp;/&nbsp;<?php echo $newsItem->getName();?>
    <?php endif; ?>

</div>
<br/>
<div class="text"> 
<h2>
    <?php echo $newsItem->getName();?>
</h2>
<?php echo $newsItem->getCreatedAt('Y-m-d'); ?>
    <div class="center_text">
        <?php echo $newsItem->getContent(); ?>
        <br/>
        
        <?php if( !empty($files) ): ?>
            <?php foreach( $files as $file ): ?>
                <?php echo link_to(image_tag('gallery/tiny/' . $file->getUname()
                                            , array(
                                                'border' => '0'
                                                , 'alt' => $file->getName()
                                                , 'title' => $file->getName()
                                                , 'class' => 'photo'))
                                    , 'http://' . get_domain_name() . '/images/gallery/medium/' . $file->getUname()
                                    , array('class' => 'lightbox'))?>
            <?php endforeach; ?>
        <?php endif; ?>
                    
            <?php echo seo_link_to(__('back')
                                , 'news'
                                , 'showall'
                                , '0'); ?>
    </div>
</div>
<div class="dashed_line">
</div>
<br/>
<script type="text/javascript">
jQuery(function() {
    
    jQuery('a.lightbox').lightBox();
    
});
</script>